package com.milks.utils;

import static org.junit.Assert.*;

import javax.servlet.ServletContext;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.web.context.ServletContextAware;

//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations={"../../../../applicationContext.xml","../../../../applicationDatasource.xml"}
public class Tes01 implements ServletContextAware{
	
	private ServletContext servletContext;
	@Test
	public void test() {
		System.out.println(123);
		System.out.println("项目的绝对路径为："+servletContext.getRealPath("/"));
	}
	@Override
	public void setServletContext(ServletContext servletContext) {
		// TODO Auto-generated method stub
		this.servletContext = servletContext;
		System.out.println("项目的绝对路径为："+servletContext.getRealPath("/"));
		
	}

}
